﻿<Carousel Images="@Images" Width="280" IsFade="true" OnClick="@OnClick"></Carousel>
<Logger @ref="Trace" class="mt-3" />

@code {
    /// <summary>
    /// 
    /// </summary>
    private Logger? Trace { get; set; }

    private IEnumerable<string> Images => new List<string>()
    {
        "_content/BootstrapBlazor.Shared/images/Pic0.jpg",
        "_content/BootstrapBlazor.Shared/images/Pic1.jpg",
        "_content/BootstrapBlazor.Shared/images/Pic2.jpg"
    };

    /// <summary>
    /// 
    /// </summary>
    /// <param name="imageUrl"></param>
    /// <returns></returns>
    private Task OnClick(string imageUrl)
    {
        Trace?.Log($"Image Clicked: {imageUrl}");
        return Task.CompletedTask;
    }
}
